home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr01 / halcn305.zip / GSOB_VAR.PAS < prev    next >
Pascal/Delphi Source File  |  1993-08-08  |  10KB  |  204 lines

  1. unit GSOB_Var;
  2. {-----------------------------------------------------------------------------
  3.                       dBase III/IV File Handler Variables
  4.  
  5.        GSOB_DBF Copyright (c)  Richard F. Griffin
  6.  
  7.        29 January 1993
  8.  
  9.        102 Molded Stone Pl
  10.        Warner Robins, GA  31088
  11.  
  12.        -------------------------------------------------------------
  13.        This unit contains global constants, types, and variables used
  14.        by Griffin Solutions units.
  15.  
  16.  
  17.                    SHAREWARE  -- COMMERCIAL USE RESTRICTED
  18.  
  19.    Changes:
  20.  
  21.       02 May 93 - Routines used for conversion to/from numbers have been
  22.                   modified to be of type FloatNum.  This allows numbers to
  23.                   have up to 20 significant digits.  Note that the $N+ and
  24.                   $E+ flags must be on in the main program to compile the
  25.                   program using this feature.  Otherwise, 11-12 digits will
  26.                   be used.  The use of the $N+,E+ switch adds 10K to program
  27.                   size.
  28.  
  29.                   When you compile a program in the $N+,E+ state, the
  30.                   compiler links with the full 80x87 emulator.  The resulting
  31.                   .EXE file can be run on any machine, regardless of whether
  32.                   that machine has an 80x87. If an 80x87 is present, the
  33.                   program will use it; otherwise, the run-time library
  34.                   emulates it.  This gives you access to four additional
  35.                   real types: Single, Double, Extended, and Comp.  The $E+
  36.                   directive will emulate the 80x87. This gives you access
  37.                   to the IEEE floating-point types without requiring that you
  38.                   install an 80x87 chip.
  39.  
  40. ------------------------------------------------------------------------------}
  41. interface
  42.  
  43. const
  44.  
  45.    {                  Run Time Error Codes                        }
  46.  
  47.    dosInvalidFunct   =    1;         {Invalid function number}
  48.    dosFileNotFound   =    2;         {File not found}
  49.    dosPathNotFound   =    3;         {Path not found}
  50.    dosTooManyFiles   =    4;         {Too many open files}
  51.    dosAccessDenied   =    5;         {File access denied}
  52.    dosInvalidHandle  =    6;         {Invalid file handle}
  53.    dosInvalidAccess  =   12;         {Invalid file access code}
  54.    dosInvalidDrive   =   15;         {Invalid drive number}
  55.    dosCantRemoveDir  =   16;         {Cannot remove current directory}
  56.    dosCantRename     =   17;         {Cannot rename across drives}
  57.    dosLockViolated   =   33;         {Attempted to read locked disk}
  58.    dosDiskReadError  =  100;         {Disk read error}
  59.    dosDiskWriteError =  101;         {Disk write error}
  60.    dosFileNotAssgd   =  102;         {File not assigned}
  61.    dosFileNotOpen    =  103;         {File not open}
  62.    dosNotOpenInput   =  104;         {File not open for input}
  63.    dosNotOpenOutput  =  105;         {File not open for output}
  64.    dosInvalidNumber  =  106;         {Invalid numeric format}
  65.    dosWriteProtected =  150;         {Disk is write-protected}
  66.    dosBadStructure   =  151;         {Bad drive request struct length}
  67.    dosDriveNotReady  =  152;         {Drive not ready}
  68.    dosDataCRCError   =  154;         {CRC error in data}
  69.    dosDiskSeekError  =  156;         {Disk seek error}
  70.    dosMediaUnknown   =  157;         {Unknown media type}
  71.    dosSectorNotFound =  158;         {Sector Not Found}
  72.    dosPrinterNoPaper =  159;         {Printer out of paper}
  73.    dosWriteFault     =  160;         {Device write fault}
  74.    dosReadFault      =  161;         {Device read fault}
  75.    dosHardwareFail   =  162;         {Hardware failure}
  76.    tpDivideByZero    =  200;         {Division by zero}
  77.    tpRangeCheck      =  201;         {Range check error}
  78.    tpStackOverflow   =  202;         {Stack overflow error}
  79.    tpHeapOverflow    =  203;         {Heap overflow error}
  80.    tpInvalidPointer  =  204;         {Invalid pointer operation}
  81.    tpFloatPointOflow =  205;         {Floating point overflow}
  82.    tpFloatPointUFlow =  206;         {Floating point underflow}
  83.    tpFloatPointInvld =  207;         {Invalid floating point operation}
  84.    tpNoOverlayMngr   =  208;         {Overlay manager not installed}
  85.    tpOverlayReadErr  =  209;         {Overlay file read error}
  86.    tpObjectNotInit   =  210;         {Object not initialized}
  87.    tpAbstractCall    =  211;         {Call to abstract method}
  88.    tpStreamRegError  =  212;         {Stream registration error}
  89.    tpCollectionIndex =  213;         {Collection index out of range}
  90.    tpCollectionOFlow =  214;         {Collection overflow error}
  91.    gsBadDBFHeader    = 1001;         {dBase DBF file header invalid}
  92.    gsDBFRangeError   = 1002;         {dBase record request beyond EOF}
  93.    gsInvalidField    = 1003;         {dBase field name is invalid}
  94.    gsBadFieldType    = 1004;         {dBase field is of incorrect type}
  95.    gsBadDBTRecord    = 1005;         {dBase memo record has format error}
  96.    gsBadFormula      = 1006;         {Formula expression cannot be translated}
  97.    gsFileAlreadyOpen = 1007;         {Dest file for sort or copy already open}
  98.    gsAreaIsNotInUse  = 1008;         {Object is not initialized in file area}
  99.  
  100.    {               Extended Run Time Error Code Information             }
  101.  
  102.                              {GSOB_DSK errors}
  103.    dskAddToFileError = 1112;         {Error in GSO_DiskFile.AddToFile}
  104.    dskCloseError     = 1103;         {Error in GSO_DiskFile.Close}
  105.    dskEraseError     = 1104;         {Error in GSO_DiskFile.Erase}
  106.    dskFileSizeError  = 1105;         {Error in GSO_DiskFile.FileSize}
  107.    dskFlushError     = 1111;         {Error in GSO_DiskFile.Flush}
  108.    dskReadError      = 1101;         {Error in GSO_DiskFile.Read}
  109.    dskRenameError    = 1106;         {Error in GSO_DiskFile.ReName}
  110.    dskResetError     = 1107;         {Error in GSO_DiskFile.Reset}
  111.    dskRewriteError   = 1108;         {Error in GSO_DiskFile.Write}
  112.    dskTruncateError  = 1109;         {Error in GSO_DiskFile.Truncate}
  113.    dskWriteError     = 1102;         {Error in GSO_DiskFile.Write}
  114.  
  115.                              {GSOB_DBF errors}
  116.    dbfAppendError     = 1206;        {Error in GSO_dBaseDBF.Append}
  117.    dbfCheckFieldError = 1299;        {Error in GSO_dBaseFLD.CheckField}
  118.    dbfGetRecError     = 1207;        {Error in GSO_dBaseDBF.GetRec}
  119.    dbfHdrWriteError   = 1201;        {Error in GSO_dBaseDBF.HdrWrite}
  120.    dbfInitError       = 1204;        {Error in GSO_dBaseDBF.Init}
  121.    dbfPutRecError     = 1202;        {Error in GSO_dBaseDBF.PutRec}
  122.  
  123.                              {GSOB_DBS errors}
  124.    dbsFormulaError    = 2101;        {Error in GSO_dBHandler.Formula}
  125.    dbsMemoGetError    = 2102;        {Error in GSO_dBHandler.MemoGet}
  126.    dbsMemoGetNError   = 2103;        {Error in GSO_dBHandler.MemoGetN}
  127.    dbsMemoPutNError   = 2104;        {Error in GSO_dBHandler.MemoPutN}
  128.    dbsPackError       = 2105;        {Error in GSO_dBHandler.Pack}
  129.    dbsSortFile        = 2107;        {Error in GSO_dBHandler.SortFile}
  130.    dbsZapError        = 2106;        {Error in GSO_dBHandler.Zap}
  131.  
  132.                              {GSOB_NDX errors}
  133.    ndxInitError        = 5101;       {Error in GSO_IndexFile.Init}
  134.    ndxNdx_AdjValError  = 5102;       {Error in GSO_IndexFile.Ndx_AdjVal}
  135.    ndxKeyUpdateError   = 5103;       {Error in GSO_IndexFile.KeyUpdate}
  136.  
  137.                              {GSOB_INX errors}
  138.    inxRetrieveKeyError = 5211;       {Error in GSO_IdxColl.RetrieveKey}
  139.  
  140.                               {GSOB_MMO errors}
  141.    mmoInitError        = 6101;       {Error in GSO_dBMemo.Init}
  142.    mmoMemoPutError     = 6102;       {Error in GSO_dBMemo.MemoPut}
  143.    mmoMemoSetParamErr  = 6199;       {Error in GSO_dBMemo4.MemoSetParam}
  144.  
  145.                              {GSOBShel errors}
  146.    shelConfirmUsedArea = 7101;       {Accessed a file area that is not Use'd}
  147.  
  148.  
  149.    {                     Status Reporting Codes                         }
  150.  
  151.    StatusStart     = -1;
  152.    StatusStop      = 0;
  153.    StatusIndexTo   = 1;
  154.    StatusIndexWr   = 2;
  155.    StatusSort      = 5;
  156.    StatusCopy      = 6;
  157.    StatusPack      = 11;
  158.    StatusSearch    = 21;
  159.    GenFStatus      = 901;
  160.  
  161.    {               Globally used constants and types                    }
  162.  
  163.    GS_dBase_MaxMemoRec  = 512; {Size of each block of memo file data}
  164.  
  165.    DB3File         = $03;       {First byte of dBase III(+) file}
  166.    DB4File         = $03;       {First byte of dBase IV file}
  167.    DB3WithMemo     = $83;       {First byte of dBase III(+) file with memo}
  168.    DB4WithMemo     = $8B;       {First byte of dBase IV file with memo}
  169.    FXPWithMemo     = $F5;       {First byte of FoxPro file with memo}
  170.  
  171.    GS_dBase_UnDltChr = $20;     {Character for Undeleted Record}
  172.    GS_dBase_DltChr   = $2A;     {Character for Deleted Record}
  173.  
  174.    EOFMark    : byte = $1A;     {Character used for EOF in text files}
  175.  
  176.    Next_Record = -1;            {Token value passed to read next record}
  177.    Prev_Record = -2;            {Token value passed to read previous record}
  178.    Top_Record  = -3;            {Token value passed to read first record}
  179.    Bttm_Record = -4;            {Token value passed to read final record}
  180.  
  181.    ValueHigh   =  1;            {Token value passed for key comparison high}
  182.    ValueLow    = -1;            {Token value passed for key comparison low}
  183.    ValueEqual  =  0;            {Token value passed for key comparison equal}
  184.  
  185.    On           : boolean = true;
  186.    Off          : boolean = false;
  187.  
  188. type
  189.    DateTypes = (American,ANSI,British,French,German,Italian,Japan,
  190.                 USA, MDY, DMY, YMD);
  191.  
  192.    SortStatus = (SortUp, SortDown, NoSort);
  193.  
  194.    {$IFOPT N+}
  195.       FloatNum = Extended;
  196.    {$ELSE}
  197.       FloatNum = Real;
  198.    {$ENDIF}
  199.  
  200. implementation
  201.  
  202. begin
  203. end.
  204.